import request from '@/utils/request'

// 查询阈值列表
export function listThresholdData(query) {
  return request({
    url: '/coal/thresholdData/list',
    method: 'get',
    params: query
  })
}

// 查询阈值详细
export function getThresholdData(id) {
  return request({
    url: '/coal/thresholdData/' + id,
    method: 'get'
  })
}

// 新增阈值
export function addThresholdData(data) {
  return request({
    url: '/coal/thresholdData',
    method: 'post',
    data: data
  })
}

// 修改阈值
export function updateThresholdData(data) {
  return request({
    url: '/coal/thresholdData',
    method: 'put',
    data: data
  })
}

// 删除阈值
export function delThresholdData(id) {
  return request({
    url: '/coal/thresholdData/' + id,
    method: 'delete'
  })
}

//
export function getDeviceAgreement(deviceTypes) {
  return request({
    url: '/coal/thresholdData/getDeviceAgreement/'+ deviceTypes,
    method: 'get',
  })
}
